home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
include
/
dev
/
RCS
/
tty.h,v
< prev
next >
Wrap
Text File
|
1990-07-17
|
8KB
|
353 lines
head 1.5;
branch ;
access ;
symbols ;
locks ; strict;
comment @ * @;
1.5
date 90.07.16.22.52.06; author shirriff; state Exp;
branches ;
next 1.4;
1.4
date 89.03.13.16.22.18; author ouster; state Exp;
branches ;
next 1.3;
1.3
date 89.03.11.11.59.22; author ouster; state Exp;
branches ;
next 1.2;
1.2
date 89.01.11.14.55.08; author rab; state Exp;
branches ;
next 1.1;
1.1
date 88.06.21.12.07.48; author ouster; state Exp;
branches ;
next ;
desc
@@
1.5
log
@Added IOC_TTY_NOT_CONTROL_TTY
@
text
@/*
* tty.h --
*
* This file defines the device-dependent IOControl calls and related
* structres for "tty" devices. These devices are supposed to behave
* identically to tty's in 4.2 BSD UNIX. See the UNIX documentation
* for detailed documentation.
*
* Copyright 1987 Regents of the University of California
* All rights reserved.
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*
* $Header: /sprite/src/lib/include/dev/RCS/tty.h,v 1.4 89/03/13 16:22:18 ouster Exp Locker: shirriff $ SPRITE (Berkeley)
*/
#ifndef _TTY
#define _TTY
/*
* Constants: these are the IOControl operations defined for tty's.
* For compatibility, the UNIX IOControl names are defined as well
* as the corresponding Sprite names.
*/
#define IOC_TTY (1<<16)
#define IOC_TTY_GET_PARAMS (IOC_TTY | 0x2)
#define IOC_TTY_SET_PARAMS (IOC_TTY | 0x3)
#define IOC_TTY_GETP IOC_TTY_GET_PARAMS
#define IOC_TTY_SETP IOC_TTY_SET_PARAMS
#define IOC_TTY_SETN (IOC_TTY | 0x4)
#define IOC_TTY_EXCL (IOC_TTY | 0x5)
#define IOC_TTY_NXCL (IOC_TTY | 0x6)
#define IOC_TTY_HUP_ON_CLOSE (IOC_TTY | 0x7)
#define IOC_TTY_FLUSH (IOC_TTY | 0x8)
#define IOC_TTY_INSERT_CHAR (IOC_TTY | 0x9)
#define IOC_TTY_SET_BREAK (IOC_TTY | 0xa)
#define IOC_TTY_CLEAR_BREAK (IOC_TTY | 0xb)
#define IOC_TTY_SET_DTR (IOC_TTY | 0xc)
#define IOC_TTY_CLEAR_DTR (IOC_TTY | 0xd)
#define IOC_TTY_GET_TCHARS (IOC_TTY | 0x11)
#define IOC_TTY_SET_TCHARS (IOC_TTY | 0x12)
#define IOC_TTY_GET_LTCHARS (IOC_TTY | 0x13)
#define IOC_TTY_SET_LTCHARS (IOC_TTY | 0x14)
#define IOC_TTY_BIS_LM (IOC_TTY | 0x15)
#define IOC_TTY_BIC_LM (IOC_TTY | 0x16)
#define IOC_TTY_GET_LM (IOC_TTY | 0x17)
#define IOC_TTY_SET_LM (IOC_TTY | 0x20)
#define IOC_TTY_GET_DISCIPLINE (IOC_TTY | 0x21)
#define IOC_TTY_SET_DISCIPLINE (IOC_TTY | 0x22)
#define IOC_TTY_ADD_EVENT (IOC_TTY | 0x23)
#define IOC_TTY_GET_TERMIO (IOC_TTY | 0x24)
#define IOC_TTY_SET_TERMIO (IOC_TTY | 0x25)
#define IOC_TTY_GET_WINDOW_SIZE (IOC_TTY | 0x26)
#define IOC_TTY_SET_WINDOW_SIZE (IOC_TTY | 0x27)
#define IOC_TTY_NOT_CONTROL_TTY (IOC_TTY | 0x28)
/*
* The data structures defined below just duplicate the 4.2 BSD data
* structures with the same names. All of this should be eliminated
* once the kernel has been changed to use the new ttyDriver.
*/
#ifndef _IOCTL
#include <sys/ioctl.h>
#endif
typedef struct sgttyb Tty_BasicParams;
typedef struct tchars Tty_Chars;
typedef struct ltchars Tty_LocalChars;
#endif _TTY
@
1.4
log
@Added back enough stuff to allow the kernel to compile. Delete this
later when the kernel tty stuff changes.
@
text
@d19 1
a19 1
* $Header: /sprite/src/lib/include/dev/RCS/tty.h,v 1.2 89/01/11 14:55:08 rab Exp Locker: ouster $ SPRITE (Berkeley)
d62 1
@
1.3
log
@Eliminate stuff that conflicts with sys/ioctl.h.
@
text
@d27 2
a28 2
* Eventually, Sprite should probably switch back to just using the
* original UNIX ioctl names.
d62 16
@
1.2
log
@*** empty log message ***
@
text
@d19 1
a19 1
* $Header: /sprite/src/lib/include/dev/RCS/tty.h,v 1.1 88/06/21 12:07:48 ouster Exp Locker: rab $ SPRITE (Berkeley)
d27 2
a28 2
* For compatibility, the UNIX IOControl names are defined as well
* as the corresponding Sprite names.
d60 2
a61 173
#ifndef TIOCGETP
#define TIOCGETP IOC_TTY_GET_PARAMS
#define TIOCSETP IOC_TTY_SET_PARAMS
#define TIOCSETN IOC_TTY_SETN
#define TIOCEXCL IOC_TTY_EXCL
#define TIOCNXCL IOC_TTY_NXCL
#define TIOCHPCL IOC_TTY_HUP_ON_CLOSE
#define TIOCFLUSH IOC_TTY_FLUSH
#define TIOCSTI IOC_TTY_INSERT_CHAR
#define TIOCSBRK IOC_TTY_SET_BREAK
#define TIOCCBRK IOC_TTY_CLEAR_BREAK
#define TIOCSDTR IOC_TTY_SET_DTR
#define TIOCCDTR IOC_TTY_CLEAR_DTR
#define TIOCGPGRP IOC_GET_OWNER
#define TIOCSPGRP IOC_SET_OWNER
#define TIOCGETC IOC_TTY_GET_TCHARS
#define TIOCSETC IOC_TTY_SET_TCHARS
#define TIOCGLTC IOC_TTY_GET_LTCHARS
#define TIOCSLTC IOC_TTY_SET_LTCHARS
#define TIOCLBIS IOC_TTY_BIS_LM
#define TIOCLBIC IOC_TTY_BIC_LM
#define TIOCLGET IOC_TTY_GET_LM
#define TIOCLSET IOC_TTY_SET_LM
#define TIOCGETD IOC_TTY_GET_DISCIPLINE
#define TIOCSETD IOC_TTY_SET_DISCIPLINE
#ifndef FIONREAD
#define FIONREAD IOC_NUM_READABLE
#endif
/*
* The data structures defined below just duplicate the 4.2 BSD data
* structres with the same names.
*/
typedef struct sgttyb {
char sg_ispeed;
char sg_ospeed;
char sg_erase;
char sg_kill;
short sg_flags;
} Tty_BasicParams;
typedef struct tchars {
char t_intrc;
char t_quitc;
char t_startc;
char t_stopc;
char t_eofc;
char t_brkc;
} Tty_Chars;
typedef struct ltchars {
char t_suspc;
char t_dsuspc;
char t_rprntc;
char t_flushc;
char t_werasc;
char t_lnextc;
} Tty_LocalChars;
/*
* Speed values: many of these may not be supported by Sprite.
*/
#define B0 0
#define B50 1
#define B75 2
#define B110 3
#define B134 4
#define B150 5
#define B200 6
#define B300 7
#define B600 8
#define B1200 9
#define B1800 10
#define B2400 11
#define B4800 12
#define B9600 13
#define EXTA 14
#define EXTB 15
#define B19200 14
#define B38400 15
/*
* Flag bits: once again, not all 4.2 BSD features may be supported
* exactly.
*/
#define ALLDELAY 0177400
#define BSDELAY 0100000
#define BS0 0
#define BS1 0100000
#define VTDELAY 040000
#define FF0 0
#define FF1 040000
#define CRDELAY 030000
#define CR0 0
#define CR1 010000
#define CR2 020000
#define CR3 030000
#define TBDELAY 06000
#define TAB0 0
#define TAB1 02000
#define TAB2 04000
#define XTABS 06000
#define NLDELAY 01400
#define NL0 0
#define NL1 00400
#define NL2 01000
#define NL3 01400
#define EVENP 0200
#define ODDP 0100
#define RAW 040
#define CRMOD 020
#define ECHO 010
#define LCASE 04
#define CBREAK 02
#define TANDEM 01
/*
* Local mode word flags:
*/
#define LCRTBS 000001
#define LPRTERA 000002
#define LCRTERA 000004
#define LTILDE 000010
#define LMDMBUF 000020
#define LLITOUT 000040
#define LTOSTOP 000100
#define LFLUSHO 000200
#define LNOHANG 000400
#define LETXACK 001000
#define LCRTKIL 002000
#define LPASS8 004000
#define LCTLECH 010000
#define LPENDIN 020000
#define LDECCTQ 040000
#define LNOFLSH 0100000
/*
* Line disciplines: only NTTYDISC is supported by Sprite.
*/
#define OTTYDISC 0
#define NETLDISC 1
#define NTTYDISC 2
/*
* Default values for various control characters:
*/
#define CTRL(x) ('x' & 037)
#define CERASE 0177
#define CKILL CTRL(u)
#define CINTR CTRL(c)
#define CQUIT 034
#define CSTART CTRL(q)
#define CSTOP CTRL(s)
#define CEOF CTRL(d)
#define CBRK 0377
#define CSUSP CTRL(z)
#define CDSUSP CTRL(y)
#define CRPRNT CTRL(r)
#define CFLUSH CTRL(o)
#define CWERASE CTRL(w)
#define CLNEXT CTRL(v)
#endif
@
1.1
log
@Initial revision
@
text
@d19 1
a19 1
* $Header: tty.h,v 2.1 88/02/17 19:21:19 nelson Exp $ SPRITE (Berkeley)
d58 2
@